<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>新闻标签添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加创新机制':action=='Modify'?'修改创新机制':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'innovation_mechanism', 'form': 'dataForm' ,'primary_key':'Innovation_Mechanism_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">创新机制信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">创新机制名称</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请输入创新机制名称', trigger: 'blur' }]"
                prop="Innovation_Mechanism_Name">
                <el-input v-model="dataForm.Innovation_Mechanism_Name" class="borderless-input"
                  placeholder="请输入创新机制名称" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">目标</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请输入目标', trigger: 'blur' }]"
                prop="Innovation_Mechanism_Target">
                <el-input type="textarea" :autosize="{ minRows: 3}"  v-model="dataForm.Innovation_Mechanism_Target" class="borderless-input" placeholder="请输入目标" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">汇报周期</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请选择汇报周期', trigger: 'change' }]"
                prop="Cycle_SerialNumber">
                <el-select clearable v-model.trim="dataForm.Cycle_SerialNumber" placeholder="请选择汇报周期" filterable
                  style="width: 100%">
                  <el-option v-for="(item,index) in base_cycle" :key="index" :label="item.Cycle"
                    :value="item.Cycle_SerialNumber"></el-option>
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">操作描述</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请输入操作说明', trigger: 'blur' }]"
                prop="Operating_Instructions">
                <yl-text-editor v-model="dataForm.Operating_Instructions" placeholder="请输入操作说明"></yl-text-editor>
              </el-form-item>
            </el-descriptions-item>
            <!-- <el-descriptions-item>
              <template #label>
                <div class="cell-item">适用组织</div>
              </template>
              <el-form-item prop="Government_Agencies_SerialNumber" :rules="[{ required: true, message: '请选择适用组织', trigger: 'change' }]">
                <yl-cascader v-model="dataForm.Government_Agencies_SerialNumber"  placeholder="请选择适用组织" :options="organization" 
                  :props="{ value:'Government_Agencies_SerialNumber', label:'Agensies_Name' ,checkStrictly: true }"></yl-cascader> 
              </el-form-item>
            </el-descriptions-item> -->
          </el-descriptions>
        </el-form>
        <div id="ChildTable">
          <div class="table_titel">
            <div class="titel">任务分解</div>
            <div class="operation">
              <el-button type="primary" size="small" @click="handleAdd('childDataForm')">新增</el-button>
              <el-button type="danger" size="small" @click="handleRemove('childDataForm')">删除</el-button>
            </div>
          </div>
          <el-form :model="{childDataForm}" ref="form1" :inline-message="true" style="width: 100%">
            <el-descriptions
              :data-options="JSON.stringify({ 'TableName': 'innovation_mechanism_details', 'form': 'childDataForm', 'ParentTableName': 'innovation_mechanism'})"
              :column="2" size="large" border>
              <template v-for="(item,index) in childDataForm.filter(item => item.Row_Status != '1')" :key="index">
                <el-descriptions-item :span="2">
                  <template #label>
                    <div class="cell-item">{{index + 1}}.任务说明</div>
                  </template>
                  <el-form-item :prop="'childDataForm.'+index+'.Innovation_Mechanism_Detail_Name'"
                    :rules="[{ required: true, message: '请输入任务说明', trigger: 'blur' }]">
                    <el-input type="textarea" :autosize="{ minRows: 3}" v-model="item.Innovation_Mechanism_Detail_Name"
                      class="borderless-input" placeholder="请输入任务说明" />
                  </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">牵头单位</div>
                  </template>
                  <el-form-item :prop="'childDataForm.'+index+'.Government_Agencies_SerialNumber'"
                    :rules="[{ required: true, message: '请选择牵头单位', trigger: 'change' }]">
                    <yl-cascader v-model="item.Government_Agencies_SerialNumber" placeholder="请选择牵头单位"
                      :options="organization"
                      :props="{ value:'Government_Agencies_SerialNumber', label:'Agensies_Name' ,checkStrictly: true }"></yl-cascader>
                  </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">责任单位</div>
                  </template>
                  <el-form-item :prop="'childDataForm.'+index+'.agencies'"
                    :rules="[{ required: true, message: '请选择责任单位', trigger: 'change' }]">
                    <el-cascader v-model="item.agencies" placeholder="请选择责任单位" :options="organization"
                      class="borderless-input" style="width: 100%;"
                      :props="{ value:'Government_Agencies_SerialNumber', label:'Agensies_Name' ,checkStrictly: true, multiple: true }"></el-cascader>
                  </el-form-item>
                </el-descriptions-item>
              </template>
            </el-descriptions>
          </el-form>
        </div>
      </div>

    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" :loading="loading" plain @click="handleSubmit">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>